package com.summer.framework.bill.controller.rpc;

import com.summer.framework.bill.entity.Bill;
import com.summer.framework.bill.service.BillService;
import com.summer.framework.common.controller.BaseRpcController;
import com.summer.framework.common.entity.response.BooleanResponse;
import com.summer.framework.common.util.UUIDUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @auther: 杨杰
 * @date: 2020/4/22 10:43
 * @description:
 */
@RestController
@RequestMapping("/api/bill")
@Slf4j
public class BillRpcController extends BaseRpcController<BillService, Bill> {



    @PostMapping("")
    public boolean save(@RequestParam("userName") String userName){
        return baseService.save(Bill
                .builder()
                .userId(userName)
                .build());
    }

}
